You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(infra): rebuild a sentry with a 10s RPC timeout - #1492
A sentry built from the CDK ValidatorSet now renders [rpc] timeout = '10s' in its config.toml, instead of kwild's default of 20 s. The two mainnet sentries already run 10 s, set by hand in their config, so a node rebuilt from this code keeps the value.
Clients of the public RPC nodes commonly time out at 15 s. With a 20 s limit, a slow request keeps them waiting past their own timeout. At 10 s kwild answers with a timeout error first.
What changes
config/node/kwild-config.tmpl and NewDefaultValues in config/node/values.go default the RPC timeout to 10s.
config/node/values_test.go checks both defaults. The new lib/constructs/validator_set/node_test.go renders each node's config through the sentry path and checks the value. Both tests failed on 20s before the change.
The infra test job in CI also runs ./config/node/ and ./lib/constructs/validator_set/, so the new tests run there.
deployments/infra/README.md explains the value and how to set it on a running node.
Scope
Every node built from the ValidatorSet launch template: in prod, the two mainnet sentries; in dev stacks, the dev validators too.
Not the mainnet leader, which this code does not build.
Not testnet. Its nodes use stacks/docker-compose.template.yml, which the testnet leader, the sentry and outside operators share, so it has no sentry-only switch. A testnet sentry can take the same value with KWILD_RPC_TIMEOUT=10s in its .env.
Note
The limit covers every RPC request, so a broadcast that waits for its transaction to commit is also cut at 10 s, before broadcast_tx_timeout (15 s) is reached. The README says so.
Checks
go test -count=1 ./config/ ./config/node/ ./lib/tn/ ./lib/constructs/validator_set/ passes on Go 1.25.3, the CI version.
The default RPC request timeout for nodes is now 10 seconds, down from 20 seconds. This applies to all RPC requests, including transaction broadcasts waiting for commit.
Documentation
Added guidance on the timeout setting, first-boot configuration, and applying the setting to running nodes.
Testing
Infrastructure checks now verify that rendered node configurations use the 10-second timeout and cover additional configuration areas.
No actionable comments were generated in the recent review.
Walkthrough
The infrastructure node configuration now defaults the RPC request timeout to 10 seconds instead of 20 seconds. The README documents the setting and ways to apply it. Tests verify the default and rendered values, and CI runs the added test packages.
Changes: RPC Timeout Configuration
Layer / File(s)
Summary
Set and document the RPC timeout deployments/infra/config/node/values.go, deployments/infra/config/node/kwild-config.tmpl, deployments/infra/README.md
The node configuration default changes from 20 seconds to 10 seconds. The README describes the timeout scope and ways to apply the setting.
Verify rendered timeout in tests deployments/infra/config/node/values_test.go, deployments/infra/lib/constructs/validator_set/node_test.go, .github/workflows/ci.yaml
Tests check the default and rendered RPC timeout. The CI test command adds the node configuration and validator set packages.
This lowers the default RPC request timeout to 10 seconds for nodes built from the ValidatorSet launch template. The documented tradeoff is that broadcasts waiting for commit may time out sooner. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: the RPC timeout is lowered to 10 seconds in the infra node config. The changeset sets the default RPC request timeout to 10s in the template, values.go, and tests, and…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the RPC timeout is lowered to 10 seconds in the infra node config. The changeset sets the default RPC request timeout to 10s in the template, values.go, and tests, and adds a README section. The title's 'rebuild a sentry' phrasing is narrower than the change, which applies to every node built from the ValidatorSet launch template, but it still refers to a real part of the change. The 'chore(infra)' prefix matches the deployments/infra path.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A sentry built from the CDK
ValidatorSetnow renders[rpc] timeout = '10s'in itsconfig.toml, instead of kwild's default of 20 s. The two mainnet sentries already run 10 s, set by hand in their config, so a node rebuilt from this code keeps the value.Clients of the public RPC nodes commonly time out at 15 s. With a 20 s limit, a slow request keeps them waiting past their own timeout. At 10 s kwild answers with a timeout error first.
What changes
config/node/kwild-config.tmplandNewDefaultValuesinconfig/node/values.godefault the RPC timeout to 10s.config/node/values_test.gochecks both defaults. The newlib/constructs/validator_set/node_test.gorenders each node's config through the sentry path and checks the value. Both tests failed on 20s before the change../config/node/and./lib/constructs/validator_set/, so the new tests run there.deployments/infra/README.mdexplains the value and how to set it on a running node.Scope
ValidatorSetlaunch template: in prod, the two mainnet sentries; in dev stacks, the dev validators too.stacks/docker-compose.template.yml, which the testnet leader, the sentry and outside operators share, so it has no sentry-only switch. A testnet sentry can take the same value withKWILD_RPC_TIMEOUT=10sin its.env.Note
The limit covers every RPC request, so a broadcast that waits for its transaction to commit is also cut at 10 s, before
broadcast_tx_timeout(15 s) is reached. The README says so.Checks
go test -count=1 ./config/ ./config/node/ ./lib/tn/ ./lib/constructs/validator_set/passes on Go 1.25.3, the CI version.Related:
Summary by CodeRabbit